<template>
	<view v-if="list.length > 0">
		<view class="bike" v-for="item in list" :key="item.id" @click="goBikeDetail(item)">
			<image :src="imgUrl + item.img.split(',')[0]"></image>
			<view class="bikeParams">
				<view class="bikeName"> {{item.name}}</view>
			</view>
		</view>
		<view class="loadMore">
			<ant-loading type="spin" style="width: 20px; height: 20px" color="#000"
				v-if="loadMoreStatus === 'loading'" />
			{{loadMoreText}}
		</view>
	</view>
</template>

<script>
	export default {
		name: 'cusomList',
		props: {
			list: {
				type: Array,
				default: () => []
			},
			pageSize: {
				type: Number,
				default: 10
			},
			pageNum: {
				type: Number,
				default: 1
			},
			actionUrl: {
				type: String,
				default: ''
			}
		},
		methods: {
			goBikeDetail(item) {
				const token = uni.getStorageSync('token')
				if (token) {
					uni.navigateTo({
						url: `/pages/bikeDetail/bikeDetail?bikeId=${item.id}&&bikeType=${item.bikeType}`
					})
				} else {
					uni.switchTab({
						url: '/pages/my/my'
					})
				}
			}
		}
	}
</script>

<style>
</style>
